package com.ztesoft.web.filecommon.db.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.ztesoft.web.common.db.po.DmPO;
import com.ztesoft.web.filecommon.db.arg.DmFArg;
import com.ztesoft.web.filecommon.db.po.DmFPO;

public interface IDmFMapper {
    
    List<Integer> countByArg(DmFArg arg);

    List<DmFPO> selectByArg(DmFArg arg);

    DmFPO selectByPrimaryKey(Integer id);

    List<DmFPO> selectByArgAndPage(DmFArg arg, RowBounds rowBound);

    int insert(DmFPO record);

    int insertSelective(DmFPO record);

    //int insertBatch(@Param("list") List<DmFPO> records);

    int updateByArgSelective(@Param("record") DmFPO record,
            @Param("arg") DmFArg arg);

    int updateByArg(@Param("record") DmFPO record,
            @Param("arg") DmFArg arg);
    
    int updateByArgSelectiveSize(@Param("tableName")String tableName, @Param("record") DmFPO record,
    		@Param("trackId")Integer trackId);
    
    DmFPO selectTotalRecord(@Param("tableName")String tableName, @Param("id")Integer id);

    int updateByPrimaryKeySelective(@Param("tableName")String tableName, @Param("record")DmFPO record);

    int updateByPrimaryKey(DmFPO record);
    
    int deleteByArg(DmFArg arg);
    
    int deleteByPrimaryKey(Integer id);
    
    List<DmFPO> selectDmF(@Param("tableName")String tableName);
    
    List<DmFPO> selectDmFByDmInfoId(@Param("tableName")String tableName, @Param("dmInfoId")Integer dmInfoId);
    
    DmFPO selectShellInfo(@Param("tableName")String tableName, @Param("id")Integer id);
    
    List<DmFPO> selectByDmInfoId(@Param("tableName")String tableName, @Param("id")Integer id);
    
    List<DmFPO> qryLeftErrorInfoFile(@Param("tableName")String tableName, @Param("dmTaskId")Integer dmTaskId, @Param("state")String state);
    
    List<DmFPO> qryRightErrorInfoFile(@Param("tableName")String tableName, @Param("dmTaskId")Integer dmTaskId, @Param("state")String state);
    
    int insertBatch(@Param("table")String tableName, @Param("list") List<DmFPO> records);
    
}